NOM = rapport

TEX_SOURCE = $(NOM).tex
TEX_FILES   = *.tex natim.sty

PDFLATEX = pdflatex

all: $(NOM).pdf

$(NOM).pdf:$(TEX_SOURCE) $(TEX_FILES)
	pdflatex $<

full: $(TEX_SOURCE) $(TEX_FILES) clean
	pdflatex $<
	makeindex $(NOM).idx
	pdflatex $<

clean:
	@rm -f *~ *.aux *.log *.toc *.lof *.lot *.ilg *.ind *.idx *.dvi *.out

real-clean:
	$(MAKE) clean
	@rm -f *.pdf *.ps *.dvi

WD = $(shell pwd)

archive:
	$(MAKE) clean
	cd ..; \
	tar jcf $(join $(WD), .tar.bz2) ./$(shell basename $(WD)); \
	tar zcf $(join $(WD), .tar.gz) ./$(shell basename $(WD)); \
	cd $(WD)
